<?php
	namespace Home\Controller;
	class AppraiseController extends BaseController {
		public function deal() {
			if(cookie('username')) {
				// 接收数据
				$post = I('post.');
				$model = D('Appraise');
//				$article = D('Article');
//				$article->updateAppraise($post['article_id']);
				//var_dump($post);die;
				$post['cre_time'] = date("Y-m-d H:i:s",time());
				$result = $model->addAppraise($post);
				if($result) {
					$this->success('评价成功');
				}else {
					$this->error('评价失败');
				}
			}else {
				$this->error('请先登录',U('Login/login'));
			}
		}
	}
